<template>
  <div class="about">
    <div v-for="(item,index) in listItems"
    :key="index"
    class="store_item_container">
      <div>{{item.name}}</div>
      <div @click="onClick(item)">+</div>
    </div>
  </div>
</template>

<script>
// import axios from "axios";

export default {
  mounted(){
    this.$store.dispatch("getList")
  },
  computed:{
    listItems:function(){
      return this.$store.state.cartModule.listItems
    }
  },
  methods:{
    onClick(item){
      this.$store.dispatch("addItemToCart",item)
    }
  }
}
</script>

<style scoped>
.store_item_container
{
  width: 100%;
  height: 100px;
  border: 1px solid red;
}
</style>